Repository navigation
Conversation
Every mobile permission target shared one form with full|limited modes, so an app id placed after `notifications` was refused as a bad mode. Only photos honours a mode (iOS photos-add); Android and the other iOS targets refuse one at runtime. Give photos its own form with the modes, so the other mobile targets refuse a fourth positional with "takes no mode", and a valid photos mode followed by another positional is refused as "takes one mode". When an app-scoped target gets a value that looks like a bundle id or package, the refusal says to pass it with --app.
|
Thanks for the fix. The change at 0bac014 is ready: the parser now accepts a permission mode only for photos, and the code paths read as correct. Not blocking, and these can be taken or left: the |
… and list targets from the forms
|
Thanks! I took the first two in 1f9f64e:
I left the |
|
Thanks for the follow-up. The PR is ready at 1f9f64e: the earlier clean review at 0bac014 (#5006 (comment)) still holds, and the delta code and its test read correctly. Not blocking: when a caller sends positionals straight to the daemon, such as ["permission","deny","notifications","com.example.app"], parseSettingsArgs in https://github.com/callstack/agent-device/blob/1f9f64e/packages/daemon/src/execution/handlers/snapshot-settings.ts#L75 returns errorResponse(error.code, error.message) and drops the typed details and hint, so that caller no longer sees the --app guidance; the CLI route is not affected, and this can be taken or left, for example by passing the details through as the app-not-consumed refusal does. The Smoke Tests failure looks unrelated: it is the apt-get update timeout in the Linux desktop dependencies step, which fails before any agent-device code runs, so it needs a re-run, not a code change. Body rules was cancelled after an earlier run passed, and the check:affected run for this commit is still queued. There are no conflicts. Before merge, re-run Smoke Tests and wait for Body rules and check:affected to pass. Not verified here: the tests, the generate:reasons check and the emulator were not run, and the Android output and base-failure claims in the PR body date from 0bac014. |
Summary
Every mobile
settings permissiontarget accepted thefull|limitedmodes. So an app id typed where--appbelongs (settings permission deny notifications com.example.app) was refused as a bad mode, and when the output was discarded the change silently never happened. Only iOSphotoshonours a mode, and the runtimes already refuse one for every other target.Now:
photoshas its own form with the modes.reason: setting_permission_app_positional,dispatched: no, the app indetails.app, and the hintPass the app with --app <id>.INVALID_ARGS.Before / after
Android emulator (Pixel 9 AVD, Android 16):
Validation
1f9f64e1d,check:affected --run --head,exactCommit: true(same result at0bac0145b). Format, lint, typecheck, layering, fallow, build and vitest-related pass.unitfails only onupload-http-deadlineandcommitted-source-tree, which fail the same way on clean main on this macOS host.settings.test.tscases fail at base.